import cv2
import numpy as np

#### 二、读取图像
image = cv2.imread("robot.png")

#### 三、增加对比度（α=1.5）
increased_contrast = cv2.convertScaleAbs(image, alpha=1.5)

#### 四、降低对比度（α=0.5）
decreased_contrast = cv2.convertScaleAbs(image, alpha=0.5)

#### 五、横向拼接对比
combined_image = cv2.hconcat([image, increased_contrast, decreased_contrast])

cv2.imshow("Original - Increased Contrast - Decreased Contrast", combined_image)
cv2.waitKey(0)
cv2.destroyAllWindows()

# 保存图片
cv2.imwrite("robot_1.png", combined_image)
